import request from '@/utils/request'

// 查询虫情防治措施列表
export function listPrevention(query) {
  return request({
    url: '/system/prevention/list',
    method: 'get',
    params: query
  })
}

// 查询虫情防治措施详细
export function getPrevention(id) {
  return request({
    url: '/system/prevention/' + id,
    method: 'get'
  })
}

// 新增虫情防治措施
export function addPrevention(data) {
  return request({
    url: '/system/prevention',
    method: 'post',
    data: data
  })
}

// 修改虫情防治措施
export function updatePrevention(data) {
  return request({
    url: '/system/prevention',
    method: 'put',
    data: data
  })
}

// 删除虫情防治措施
export function delPrevention(id) {
  return request({
    url: '/system/prevention/' + id,
    method: 'delete'
  })
}
